Skip to content

Conversation

@jkbktl
Copy link
Contributor

@jkbktl jkbktl commented Oct 14, 2025

how to test:

  1. Create vaults and stake some tokens, do it multiple times, so you can withdraw from multiple vaults, ideally two or three different addresses as well
  2. When you have staked tokens, let me know, so I know, we have enough to test it
  3. Wait until I'll let you know that emergency mode was enabled
  4. test the feature via withdraw button that should appear in the vaults table

@changeset-bot
Copy link

changeset-bot bot commented Oct 14, 2025

🦋 Changeset detected

Latest commit: 5a3c8aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@status-im/status-network Patch
hub Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 14, 2025

@jkbktl is attempting to deploy a commit to the Status Team on Vercel.

A member of the Team first needs to authorize it.

@status-im-auto
Copy link
Member

status-im-auto commented Oct 16, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 55f51bc #2 2025-10-16 19:57:21 ~37 sec connector 📦zip
✔️ 55f51bc #2 2025-10-16 19:58:12 ~1 min wallet 📦zip
✔️ 312e9a6 #10 2025-11-06 22:37:50 ~47 sec connector 📦zip
✔️ 312e9a6 #10 2025-11-06 22:38:10 ~1 min wallet 📦zip

@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
status-network-hub Ready Ready Preview 💬 6 unresolved Nov 10, 2025 6:07pm
status-network-website Ready Ready Preview Comment Nov 10, 2025 6:07pm

@jkbktl jkbktl marked this pull request as ready for review November 5, 2025 10:50
Copilot AI review requested due to automatic review settings November 5, 2025 10:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements an emergency withdrawal feature for staking vaults, allowing users to withdraw funds when emergency mode is enabled on the staking contract.

Key changes:

  • Added emergency mode detection and UI components (emergency bar, danger button variants)
  • Implemented emergency exit functionality using emergencyExit contract method
  • Updated vault data to track actual token balance (depositedBalance) for accurate display during emergency mode

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/status-network/tailwind.config.ts Added danger color palette (50, 60 variants) for emergency UI elements
packages/status-network/src/components/button/index.tsx Added size 24 button variant and moved text sizing from base to size-specific styles
packages/status-network/src/components/button-link/index.tsx Added danger and grey variants, size 24 support, matching button component updates
apps/hub/src/app/stake/page.tsx Conditionally hides total staked section when emergency mode is active
apps/hub/src/app/_hooks/useVaultEmergencyExit.ts New hook implementing emergency withdrawal flow using vault's emergencyExit function
apps/hub/src/app/_hooks/useStakingVaults.ts Added depositedBalance field fetched via token balanceOf for reliable emergency mode display
apps/hub/src/app/_constants/address.ts Updated contract addresses for staking manager and vault factory
apps/hub/src/app/_components/vaults/vaults-table.tsx Changed emergency mode polling from staleTime to refetchInterval
apps/hub/src/app/_components/vaults/table-columns.tsx Updated staked column to show vault balance in emergency mode using depositedBalance
apps/hub/src/app/_components/vaults/modals/withdraw-vault-modal.tsx Switched from useVaultWithdraw to useVaultEmergencyExit, added amountWei prop
apps/hub/src/app/_components/hub-layout.tsx Added emergency mode detection and EmergencyBar component rendering
apps/hub/src/app/_components/emergency-bar.tsx New component displaying emergency warning banner with withdraw action
.changeset/hungry-bananas-join.md Changeset entry for withdraw feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jkbktl jkbktl changed the title withdraw add withdraw Nov 5, 2025
@jkbktl jkbktl requested review from a team, JulesFiliot, felicio, iamonuwa and jinhojang6 November 5, 2025 11:02
@jkbktl jkbktl changed the base branch from main to release/hub November 5, 2025 12:55
@github-project-automation github-project-automation bot moved this from In Progress to Waiting in Web & User Interfaces Nov 7, 2025
Copy link
Contributor

@JulesFiliot JulesFiliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: (tested emergency withdrawal, all good 👍 )

@jkbktl jkbktl merged commit c5de825 into status-im:release/hub Nov 10, 2025
4 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Waiting to Done in Web & User Interfaces Nov 10, 2025
@jkbktl jkbktl deleted the feat/withdraw branch November 10, 2025 21:58
iamonuwa pushed a commit that referenced this pull request Nov 14, 2025
* add withdraw

* Add changeset for patch updates

* address feedback

* address feedback

* change contracts address back to production

* add use client to emergencyMode hook

* test fix build

* test fix build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants